package main

import (
	"bo.wang/st-chain/core"
	"fmt"
)

func main() {
	chain := core.NewChain("This is genesis", 0)
	chain.AddBlock("first block")
	chain.AddBlock("second block")
	chain.AddBlock("third block")
	chain.AddBlock("fourth block")
	fmt.Println(chain)
	if validateResults := chain.Validate(); validateResults != core.ValidatePassed {
		fmt.Printf("validation failed. [Error]: %s\n", validateResults)
	}
}
